% V20210224 - 5.4 GW_ADD_BAR_RBUTTON$ [2] INCLUDE "GW.bas" % Make a page. MainPage = GW_NEW_PAGE() % Prepare title string. Center$ = GW_ADD_BAR_TITLE$("My Program") % Prepare right menu string. array.load FileArray$[], "#File", "Open", "Close", "Rename" RightMenu$ = GW_ADD_BAR_RMENU$(FileArray$[]) % Add the title bar to the page. GW_ADD_TITLEBAR(MainPage, Center$ + RightMenu$) % Render the page and wait for user action. GW_RENDER(MainPage) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Example feedback. POPUP r$ % End when BACK key is pressed. UNTIL r$ = "BACK" END